#
# Be sure to run `pod lib lint BKKit.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'BKKit'
  s.version          = '0.1.1'
  s.summary          = 'This lib contains some tools, such as theme, string category'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
This lib contains some tools, such as theme, string category, and so on...
                       DESC

  s.homepage         = 'https://github.com/baboy/BKKit'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'baboy' => 'baboyzyh@gmail.com' }
  # s.source           = { :git => 'https://github.com/baboy/BKKit.git', :tag => s.version.to_s }
  s.source           = { :git => 'https://gitee.com/aonline/BKKit.git', :tag => s.version }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '10.0'

  s.source_files = 'BKKit/Classes/*.{h,m}'
  
  # s.resource_bundles = {
  #   'BKKit' => ['BKKit/Assets/**/*.png','BKKit/Assets/**/*.plist', 'BKKit/Classes/**/*.plist']
  # }
  s.resources = ['BKKit/Classes/**/*.plist']
  s.public_header_files = 'BKKit/Classes/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
  
  
  s.subspec 'categories' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.ios.frameworks = "Foundation", "UIKit"
      ss.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/CommonCrypto" }
      ss.source_files = 'BKKit/Classes/categories/*.{h,m,c}'
      ss.public_header_files = 'BKKit/Classes/categories/*.h'
  end
  
  
  s.subspec 'ext' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'BKKit/categories'
      ss.source_files = 'BKKit/Classes/ext/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/ext/*.h'
  end
  s.subspec 'lang' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'BKKit/categories'
      ss.source_files = 'BKKit/Classes/lang/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/lang/*.h'
  end
  
  s.subspec 'utils' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'Reachability'
      ss.source_files = 'BKKit/Classes/utils/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/utils/*.h'
  end
  
  s.subspec 'dao' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'FMDB'
      ss.dependency 'BKKit/utils'
      ss.source_files = 'BKKit/Classes/dao/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/dao/*.h'
  end
  
  s.subspec 'http' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'AFNetworking'
      ss.dependency 'BKKit/utils'
      ss.dependency 'BKKit/categories'
      ss.dependency 'BKKit/lang'
      ss.source_files = 'BKKit/Classes/http/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/http/*.h'
  end
  
  s.subspec 'api' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'BKKit/categories'
      ss.source_files = 'BKKit/Classes/api/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/api/*.h'
  end
  
  
  s.subspec 'ui' do |ss|
      ss.ios.deployment_target = '10.0'
      ss.dependency 'BKKit/categories'
      ss.dependency 'BKKit/http'
      ss.source_files = 'BKKit/Classes/ui/**/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/ui/**/*.h'
      
      ss.subspec 'view' do |sss|
          sss.source_files = 'BKKit/Classes/ui/view/*.{h,m}'
          sss.public_header_files = 'BKKit/Classes/ui/view/*.h'
      end
      
      ss.subspec 'theme' do |sss|
          sss.ios.deployment_target = '10.0'
          sss.dependency 'BKKit/ui/view'
          sss.source_files = 'BKKit/Classes/ui/theme/*.{h,m}'
          sss.public_header_files = 'BKKit/Classes/ui/theme/*.h'
      end
      ss.subspec 'controller' do |sss|
          sss.ios.deployment_target = '10.0'
          sss.dependency 'BKKit/ui/view'
          sss.dependency 'BKKit/ui/theme'
          sss.dependency 'BKKit/utils'
          sss.source_files = 'BKKit/Classes/ui/controller/*.{h,m}'
          sss.public_header_files = 'BKKit/Classes/ui/controller/*.h'
      end
  end
  
  s.subspec 'ctx' do |ss|      
      ss.ios.deployment_target = '10.0'
      ss.source_files = 'BKKit/Classes/ctx/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/ctx/*.h'
  end
  
  # s.dependency 'Reachability'
  # s.dependency 'FMDB'
  # s.dependency 'RegexKitLite'
  # s.dependency 'AFNetworking'
  s.dependency 'OpenUDID'
end
